﻿using System.Collections.Generic;
using System.Linq;
using System.ServiceModel.Activation;
using Acaweb.Common;
using Acaweb.Model.Entities;
using Acaweb.Model.Entities.DatosCompuestos;
using Acaweb.Servicios.Contracts;
using Components = Acaweb.Componentes.Contracts;

namespace Acaweb.Servicios.Services
{
    [AspNetCompatibilityRequirements(RequirementsMode = AspNetCompatibilityRequirementsMode.Required)]
    public class SolicitudesService : ISolicitudesService
    {
        Components.ISolicitudesService _SolicitudComponent = AppCtx.Resolve<Components.ISolicitudesService>();

        public List<Solicitudes> GetAll()
        {
            return _SolicitudComponent.GetAll().ToList();
        }

        public Solicitudes GetById(int Id)
        {
            return _SolicitudComponent.GetById(Id);
        }

        public List<Solicitudes> GetByEstado(EstadoSolicitud Estado)
        {
            return _SolicitudComponent.GetByEstado(Estado).ToList();
        }

        public List<Solicitudes> GetByPlanEstudio(int CodigoPlan)
        {
            return _SolicitudComponent.GetByPlanEstudio(CodigoPlan).ToList();
        }

        public void Insert(Solicitudes Solicitud)
        {
            _SolicitudComponent.Insert(Solicitud);
        }

        public void Update(Solicitudes Solicitud)
        {
            _SolicitudComponent.Update(Solicitud);
        }
    }
}